package com.ligongmusic.util;

import java.util.List;

import android.app.AlertDialog;
import android.app.AlertDialog.Builder;
import android.content.Context;
import android.content.DialogInterface;
import android.view.View;

public class DialogUtils {
	private static AlertDialog selectDialog;
	/**
	 * 系统自带列表选择框
	 */
	public static void selectDialog(Context mContext, final String[] items, final SelectCallBack callback){
		selectDialog = new AlertDialog.Builder(mContext).setItems(items,
			new DialogInterface.OnClickListener() {
				public void onClick(DialogInterface dialog, int item) {
					callback.select(items[item]);
					selectDialog.dismiss();
				}
			}).create();
		selectDialog.show();
	}
	
	public interface SelectCallBack{
		void select(String item);
	}
	
}
